home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 9 / CDACTUAL9.iso / share / Dos / VARIOS / pascal / DELPHI.SWG / 0014_Re: TMemo Help >> Setting Margins.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1996-02-21  |  599 b   |  23 lines

  1. {
  2. In article 25@mailhost.primenet.com, rkr@primenet.com writes:
  3. >Is there a way in a TMemo object to set the text margin from the left and or t
  4. op??
  5. >
  6. >Meaning , all the text going down the left side of the memo would start let's
  7. say,
  8. >10 pixels over instead of right up against the side of the Memo ??
  9. >
  10. }
  11.  
  12. procedure TEditForm.SetEditRect;
  13. Var
  14.   R : TRect;
  15. begin
  16.   R := DisplayMemo.ClientRect;
  17.   R.Left:=R.Left + kMemoIndent;
  18.   R.Top:=R.Top + 2;
  19.   R.Bottom:=R.Bottom - 2;
  20.   R.Right:=R.Right - kMemoIndent;
  21.   SendMessage(DisplayMemo.Handle, EM_SETRECT, 0, Longint(@R));
  22. end;
  23.